<template>
	<view>
		<Signature ref="sig" ></Signature>
	</view>
</template>

<script>
	
	import Signature from '@/components/sin-signature/sin-signature.vue';
	export default {
		components: {
			Signature 
		},
		data() {
			return {
				signPath:''
			}
		},
		onLoad() {
			const that = this;
			setTimeout(function(){
				that.startSign();
			},500)
		},
		methods: {
			async startSign(){
				let s = await this.$refs.sig.getSyncSignature(); 
				 const eventChannel = this.getOpenerEventChannel();
				  eventChannel.emit('updateSign', s);
				uni.navigateBack();
			}
		}
	}
</script>

<style>

</style>
